home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3b / sigpause.z / sigpause
Encoding:
Text File  |  1998-10-20  |  3.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. SSSSIIIIGGGGPPPPAAAAUUUUSSSSEEEE((((3333BBBB))))                                                      SSSSIIIIGGGGPPPPAAAAUUUUSSSSEEEE((((3333BBBB))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      sigpause - atomically release blocked signals and wait for interrupt
  10.      (4.3BSD)
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssiiiiggggnnnnaaaallll....hhhh>>>>
  14.  
  15.      iiiinnnntttt ssssiiiiggggppppaaaauuuusssseeee((((iiiinnnntttt mmmmaaaasssskkkk))));;;;
  16.  
  17.      mmmmaaaasssskkkk ==== ssssiiiiggggmmmmaaaasssskkkk((((iiiinnnntttt ssssiiiiggggnnnnuuuummmm))));;;;
  18.  
  19.      To use any of the BSD signal routines (_k_i_l_l(3B), _k_i_l_l_p_g(3B),
  20.      _s_i_g_b_l_o_c_k(3B), _s_i_g_n_a_l(3B), _s_i_g_p_a_u_s_e(3B), _s_i_g_s_e_t_m_a_s_k(3B), _s_i_g_s_t_a_c_k(2B),
  21.      _s_i_g_v_e_c(3B)) you must either
  22.  
  23.      1) #define ____BBBBSSSSDDDD____SSSSIIIIGGGGNNNNAAAALLLLSSSS or ____BBBBSSSSDDDD____CCCCOOOOMMMMPPPPAAAATTTT before including <_s_i_g_n_a_l._h>, or
  24.  
  25.      2) specify one of them in the compile command or makefile:
  26.  
  27.           cc -D_BSD_SIGNALS -o prog prog.c
  28.  
  29.  
  30. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  31.      _s_i_g_p_a_u_s_e assigns _m_a_s_k to the set of masked signals and then waits for a
  32.      signal to arrive; upon return the original set of masked signals is
  33.      restored after executing the handler(s) (if any) installed for the
  34.      awakening signal(s).  _m_a_s_k is usually 0 to indicate that no signals are
  35.      now to be blocked.  The macro _s_i_g_m_a_s_k is provided to construct the mask
  36.      for a given signal number.  _S_i_g_p_a_u_s_e always terminates by being
  37.      interrupted, returning -1 with the global integer _e_r_r_n_o set to EEEEIIIINNNNTTTTRRRR.
  38.  
  39.      In normal usage, a signal is blocked using _s_i_g_b_l_o_c_k(3B), to begin a
  40.      critical section, variables modified on the occurrence of the signal are
  41.      examined to determine that there is no work to be done, and the process
  42.      pauses awaiting work by using _s_i_g_p_a_u_s_e with the mask returned by
  43.      _s_i_g_b_l_o_c_k.
  44.  
  45. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  46.      sigblock(3B), sigvec(3B), signal(5).
  47.  
  48. CCCCAAAAVVVVEEEEAAAATTTTSSSS ((((IIIIRRRRIIIIXXXX))))
  49.      Because 4.3BSD and System V both have _s_i_g_p_a_u_s_e system calls, programs
  50.      using 4.3BSD's version are actually executing _B_S_D_s_i_g_p_a_u_s_e.  This is
  51.      transparent to the programmer except when attempting to set breakpoints
  52.      in ddddbbbbxxxx; the breakpoint must be set at _B_S_D_s_i_g_p_a_u_s_e.
  53.  
  54. WWWWAAAARRRRNNNNIIIINNNNGGGG ((((IIIIRRRRIIIIXXXX))))
  55.      The 4.3BSD and System V signal facilities have different semantics.
  56.      Using both facilities in the same program is ssssttttrrrroooonnnnggggllllyyyy ddddiiiissssccccoooouuuurrrraaaaggggeeeedddd and
  57.      will result in unpredictable behavior.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.